package mybatisplus.config;

import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 *

 ALTER TABLE admin_group_member ADD COLUMN create_by VARCHAR(32) NOT NULL;
 ALTER TABLE admin_group_member ADD COLUMN create_time DATETIME NOT NULL;
 ALTER TABLE admin_group_member ADD COLUMN update_by VARCHAR(32) NOT NULL;
 ALTER TABLE admin_group_member ADD COLUMN update_time DATETIME NOT NULL;
 ALTER TABLE admin_group_member ADD COLUMN delete_by VARCHAR(32);
 ALTER TABLE admin_group_member ADD COLUMN delete_time DATETIME;
 ALTER TABLE admin_group_member ADD COLUMN version int NOT NULL;
 ALTER TABLE admin_group_member ADD COLUMN deleted int NOT NULL;

 *
 */
@Configuration
@EnableTransactionManagement
public class MybatisPlusConfig {
    /**
     * 乐观锁 插件
     *
     * @return
     */


    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}